<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .loading,
        .loading > div {
          position: relative;
          box-sizing: border-box;
        }
        
        .loading {
          display: block;
          font-size: 0;
          color: #000;
        }
        
        
        .loading > div {
          display: inline-block;
          float: none;
          background-color: skyblue;
          border: 0 solid skyblue;
        }
        
        .loading {
          width: 40px;
          height: 40px;
        }
        
        .loading > div {
          position: absolute;
          top: 50%;
          left: 50%;
          width: 8px;
          height: 8px;
          margin-top: -4px;
          margin-left: -4px;
          border-radius: 50%;
          animation: ball-spin 1s infinite linear;
        }
        
        .loading > div:nth-child(1) {
          top: 5%;
          left: 50%;
          animation-delay: -0.875s;
        }
        
        .loading > div:nth-child(2) {
          top: 18%;
          left: 82%;
          animation-delay: -0.75s;
        }
        
        .loading > div:nth-child(3) {
          top: 50%;
          left: 95%;
          animation-delay: -0.625s;
        }
        
        .loading > div:nth-child(4) {
          top: 82%;
          left: 82%;
          animation-delay: -0.5s;
        }
        
        .loading > div:nth-child(5) {
          top: 95%;
          left: 50%;
          animation-delay: -0.375s;
        }
        
        .loading > div:nth-child(6) {
          top: 82%;
          left: 18%;
          animation-delay: -0.25s;
        }
        
        .loading > div:nth-child(7) {
          top: 50%;
          left: 5%;
          animation-delay: -0.125s;
        }
        
        .loading > div:nth-child(8) {
          top: 18%;
          left: 18%;
          animation-delay: 0s;
        }
        

        
        @keyframes ball-spin {
          50% {
            opacity: 0.25;
            transform: scale(1);
          }
        
          100% {
            opacity: 1;
            transform: scale(1);
          }
        }
        </style>
    
</head>
<body>
    <div class="loading">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
    <!-- https://codepen.io/_happy123/pen/YzaVOvw -->

</body>
</html>